
let timerId =null
const xtzDebounce = (fun,timeout=500) =>{
	return function(arrArg=[]){
		if(timerId){
			clearTimeout(timerId)
		} 
		timerId = setTimeout(()=>{
			fun(...arrArg)
		},timeout)	
	}
}
export {xtzDebounce,timerId}
